--- mc-4.8.1.7.org/lib/tty/tty-ncurses.c	2016-02-23 22:12:17.815464286 +0000
+++ mc-4.8.1.7/lib/tty/tty-ncurses.c	2016-02-24 03:14:50.927519155 +0000
@@ -185,11 +185,13 @@
     ESCDELAY = 200;
 #endif /* HAVE_ESCDELAY */
 
+    struct termios mode;
+    tcgetattr (STDIN_FILENO, &mode);
     /* use Ctrl-g to generate SIGINT */
-    cur_term->Nttyb.c_cc[VINTR] = CTRL ('g');   /* ^g */
+    mode.c_cc[VINTR] = CTRL ('g');   /* ^g */
     /* disable SIGQUIT to allow use Ctrl-\ key */
-    cur_term->Nttyb.c_cc[VQUIT] = NULL_VALUE;
-    tcsetattr (cur_term->Filedes, TCSANOW, &cur_term->Nttyb);
+    mode.c_cc[VQUIT] = NULL_VALUE;
+    tcsetattr (STDIN_FILENO, TCSANOW, &mode);
 
     tty_start_interrupt_key ();
 
